package com.itany.mall.dao.mapper;

import java.sql.ResultSet;

import com.itany.mall.entity.ProductType;
import com.itany.mall.jdbc.template.callback.RowMapper;

public class ProductTypeRowMapper implements RowMapper<ProductType> {

	public String selectSql() {
		return " select id, name from t_product_type ";
	}

	@Override
	public ProductType mapRow(ResultSet res) throws Exception {
		ProductType t = new ProductType();
		t.setId(res.getLong("id"));
		t.setName(res.getString("name"));
		return t;
	}

}
